#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() 
{
    int n = 0;
    int m = 0;
    int arr[5][5];
    scanf("%d %d", &n, &m);
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            scanf("%d", &arr[i][j]);
        }
    }
    int a = 0;
    int b = 0;
    scanf("%d %d", &a, &b);
    printf("%d", arr[a - 1][b - 1]);
    return 0;
}
